import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import 'vant/lib/index.css'
import './style.css'

// 按需引入vant组件
import {
  Button,
  NavBar,
  Grid,
  GridItem,
  Cell,
  CellGroup,
  Field,
  Tabbar,
  TabbarItem,
  Swipe,
  SwipeItem,
  Empty
} from 'vant'

const app = createApp(App)

// 注册Vant组件
app
  .use(Button)
  .use(NavBar)
  .use(Grid)
  .use(GridItem)
  .use(Cell)
  .use(CellGroup)
  .use(Field)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(Empty);

// 注册路由和状态管理
app.use(router)
app.use(createPinia())

app.mount('#app')
